﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SearchAdvanced.aspx.cs" Inherits="FYPHP.SearchAdvanced" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table cellpadding="3" cellspacing="3" width="722" align="center" style="border: 1px solid #aaaaaa">
<tr><td>Product Name</td><td>:</td><td><asp:TextBox ID="txtName" runat="server"></asp:TextBox></td>
    <td>Seller</td><td>:</td><td><asp:TextBox ID="txtSeller" runat="server"></asp:TextBox></td></tr>

<tr><td>Description</td><td>:</td><td><asp:TextBox ID="txtDesc" runat="server"></asp:TextBox></td>
    <td>Category</td><td>:</td><td><asp:DropDownList ID="DropDownList1" 
        runat="server">
          <asp:ListItem Value="1">Category 1</asp:ListItem>
          <asp:ListItem Value="2">Category 2</asp:ListItem>
      </asp:DropDownList></td></tr>
<tr><td>Price Range (Min)</td><td>:</td><td><asp:TextBox ID="txtFrom" runat="server"></asp:TextBox></td>
    <td>Price Range (Max)</td><td>:</td><td><asp:TextBox ID="txtTo" runat="server"></asp:TextBox></td></tr>
<tr><td colspan="6" align="center" style="border-top: 1px solid #aaaaaa">
<asp:Button ID="btnSearch" runat="server" Text="Search" onclick="btnSearch_Click" />&nbsp;<asp:Button ID="btnReset" runat="server" Text="Reset" /></td></tr>
</table>

    <br />
 <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
         <asp:Repeater ID="ItemList" runat="server" EnableViewState="False">
       
<HeaderTemplate>
<table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
 <tr style="background-color: #eee; font-weight: bold;"><td>Picture</td><td>Product Name</td><td>Price</td><td>Views</td><td>Seller</td></tr>

</HeaderTemplate>

<ItemTemplate>
     <tr>
            <td align="center" width="50">
            <img src="\uploads\products\<%#DataBinder.Eval(Container.DataItem, "p_picture" ) %>" alt="" height="40px" width="40px" />
            </td>
            <td style="text-align: left"><a href="/ProductDetails.aspx?id=<%#DataBinder.Eval(Container.DataItem, "p_id" ) %>">
            <%#DataBinder.Eval(Container.DataItem, "p_name" ) %></a><br /> 
            <i style="font-size:11px;"><%#DataBinder.Eval(Container.DataItem, "p_desc" ) %></i></td>
            <td width="70">RM <%#DataBinder.Eval(Container.DataItem, "p_price" ) %></td>
            <td width="25"><%#DataBinder.Eval(Container.DataItem, "p_views" ) %></td>
            <td width="70"><%#DataBinder.Eval(Container.DataItem, "username" ) %>
            </td>
        </tr>
   </ItemTemplate>

   <FooterTemplate>
    </table>
    </FooterTemplate>
</asp:Repeater> 
        </asp:View>
        <asp:View ID="View2" runat="server">
        <table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
        <tr><td align="center"><i>No record found.</i></td></tr>
        </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>

